// Put this code in first line of web page. 
<?php 

require_once("func.php");

session_start_ifRequired();
if($_SESSION['valid']==1){
	$_SESSION['valid']=0;
	unset($_SESSION);
	session_destroy();
}


header("location:index.php");
?>